<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="aload"></a><b>aload</b> :
  retrieve object reference from local variable : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitInsn(int)">visitInsn()</a></p><dl><dt>Description</dt><dd>Retrieves an object reference from a local variable and pushes it onto
the operand stack. The aload instruction takes a single parameter,
&lt;varnum&gt;, an unsigned integer which indicates which local variable to
retrieve. The object reference in that local variable is retrieved and placed
on the stack. &lt;varnum&gt; must be a valid local variable number in the
current frame.</dd><dt>Example</dt><dd><pre>
aload 1         ; push object reference in local variable 1 onto the stack
</pre></dd><dt>Notes</dt><dd>If you use astore to store a returnAddress in a local variable,
you cannot then use aload to retrieve the value of that local
variable. Instead, if a local variable holds a returnAddress, your only choices
are to (1) use ret to return to that address, or (2) use one of the
store instructions to store some other value in the local variable.</dd><dt>See also</dt><dd><a href="ref-fload.html">fload</a> <a href="ref-.html"></a> <a href="ref-iload.html">iload</a> <a href="ref-.html"></a> <a href="ref-lload.html">lload</a> <a href="ref-.html"></a> <a href="ref-dload.html">dload</a> <a href="ref-.html"></a> <a href="ref-wide.html">wide</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before</b>
</td>
<td><b>
After</b>
</td></tr>
<tr>
<td>...</td>
<td>objectref</td></tr>
<tr>
<td></td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>aload
opcode = 0x19 (25)
</td></tr>
<tr>
<td>
u1 
</td>
<td>&lt;varnum&gt;</td></tr>
</table>
There
is also a wide format for this instruction, which supports access to
all local variables from 0 to 65535:
<table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>u1</td>
<td>wide
opcode = 0xC4 (196)
</td></tr>
<tr>
<td>u1</td>
<td>aload
opcode = 0x19 (25)
</td></tr>
<tr>
<td>u2</td>
<td>&lt;varnum&gt;</td></tr>
</table></dd></dl></body></html>